package me.helllp.dake.iam.core.logic.auth;

import me.helllp.dake.common.exception.DakeEncryptException;
import me.helllp.dake.common.exception.DakeException;
import me.helllp.dake.core.bean.DakeAuthAccount;
import me.helllp.dake.iam.core.bean.DakeAuthTicket;

import java.io.UnsupportedEncodingException;

public interface IAccountLogic {
    /**
     * 基于账号ID获取用户的认证结构
     *
     * @param accountId 账号ID
     * @return 认证结构
     */
    DakeAuthAccount transferToAuthUser(Long accountId);

    /**
     * 租户下的用户登录验证
     *
     * @param account 用户账号
     * @param password 密码
     * @param tenantId 租户ID
     * @return 验证成功发放凭证，否则为空
     */
    DakeAuthTicket login(String account, String password, Long tenantId) throws DakeException;
}
